﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Framework.Zhaogang.Log.Domain.Models
{
    class AppLogDo : LogDo
    {
        /// <summary>
        /// 
        /// </summary>
        public AppLogDo(AppLogDTO appLogDTO)
        {
            base.AppId = long.Parse(appLogDTO.AppId);
            base.CreatedDate = DateTime.Parse(appLogDTO.CreatedDate);
            base.Ip = appLogDTO.Ip;
            Level = appLogDTO.Level;
            ClassName = appLogDTO.ClassName;
            MethodName = appLogDTO.MethodName;
            FromAppId = appLogDTO.FromAppId;
            Content = appLogDTO.Content;
        }

        /// <summary>
        /// 日志级别类型
        /// </summary>
        public LogLevelTypeEnum Level { get; private set; }

        /// <summary>
        /// 类全名
        /// </summary>
        public string ClassName { get; private set; }

        /// <summary>
        /// 方法名
        /// </summary>
        public string MethodName { get; private set; }

        /// <summary>
        /// 来源应用号
        /// </summary>
        public string FromAppId { get; private set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; private set; }
    }
}
